fix(search): Update Algolia search to improve content seen and styles in search results#1231
Conversation
….14, tsdown 0.21 Vite ecosystem: - vite: ^7.0.6 -> ^8.0.3 - @vitejs/plugin-react: ^4.7.0 -> ^6.0.1 - @tailwindcss/vite: ^4.1.13 -> ^4.2.2 - vite-plugin-page-reload: ^0.2.2 -> ^0.2.3 Vitest ecosystem: - vitest: ^4.0.18 -> ^4.1.2 - @vitest/browser-playwright: ^4.0.18 -> ^4.1.2 - vitest-browser-react: ^2.0.5 -> ^2.2.0 React: - react: ^19.1.0 -> ^19.2.4 - react-dom: ^19.1.0 -> ^19.2.4 - @types/react: ^19.2.2 -> ^19.2.14 ReScript: - rescript: ^12.0.0 -> ^12.2.0 - @rescript/react: ^0.14.0 -> ^0.14.2 - Migrate Exn.Error -> JsExn (deprecated in 12.2) React Router: - react-router: ^7.12.0 -> ^7.14.0 - react-router-dom: ^7.9.4 -> ^7.14.0 - @react-router/node: ^7.8.1 -> ^7.14.0 - @react-router/dev: ^7.8.1 -> ^7.14.0 tsdown: 0.20.0 -> 0.21.7 (in build:scripts)
…nto vlk/fix-algolia
|
Cool stuff. btw can you fix the clear button? Looks very weird to me as if the "Clear" text was supposed to be a popover or something. |
- Hide clear and cancel buttons for cleaner UI - Redesign footer with border and spacing adjustments - Add styles for command key display in footer
Update DocSearch commands to show 'to clear' when input has text and 'to close' when empty
I removed it and updated the footer to show clear or close with the ESC key depending on if there is text in the search box. |
* chore: remove tracked algolia values from env * feat: finish algolia env split - centralize public and publisher Algolia env parsing - disable search clearly when public env is missing - inject dev/prod Algolia envs in deploy CI - fix the pre-existing lazy wrapper compile blockers * Delete docs/superpowers/specs/2026-04-25-algolia-env-split-design.md
Resolve the package.json and yarn.lock conflicts by keeping master's formatting and test updates while preserving the Algolia env split, disabled-search fallback, and search-index build wiring.
Use an E2E-job step output for the Cloudflare Pages branch alias and feed that into the Cypress action config. This avoids the deploy job output being dropped as secret-like while still passing Cypress a concrete baseUrl.
Treat DocSearch highlight and snippet payloads as optional crawler fields before reading nested content. This keeps the custom hit renderer from crashing when Algolia returns plain hits without _snippetResult.
Wrap the DocSearch portal in a search-specific error boundary so result rendering crashes show a local search fallback instead of tripping the app route error boundary. Add a regression test that verifies surrounding page content stays rendered.
Normalize API search hierarchy labels so Stdlib keeps module names like Array while Belt renders as Belt.Array without reordering Algolia results. Render API hit titles as value names and strip module prefixes before applying highlight markup.
Add explicit DocSearch hierarchy classes to shared Markdown heading components so crawler dashboard selectors can use stable lvl1-lvl5 markers across manual, React, and API docs.
Ensure sitemap loc entries use Cloudflare's canonical trailing-slash page URLs so crawlers do not pay for redirect hops on every route.
Render DocSearch hits with React Router links so Algolia's absolute URLs can be normalized to relative paths and selected without reloading the app.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0cdb18a54c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…arch-plan # Conflicts: # .gitignore # apps/docs/__tests__/AlgoliaConfig_.test.res # apps/docs/__tests__/AlgoliaEnvStatus_.test.res # apps/docs/__tests__/Meta_.test.res # apps/docs/__tests__/Search_.test.res # apps/docs/__tests__/Sitemap_.test.res # apps/docs/__tests__/Url_.test.res # apps/docs/__tests__/__screenshots__/Search_.test.jsx/markdownToHtml-combined-transformations-bold-inside-code-stays-as-is--code-matched-first--1.png # apps/docs/__tests__/__screenshots__/Search_.test.jsx/markdownToHtml-markdown-link-stripping-handles-link-with-empty-text-1.png # apps/docs/__tests__/__screenshots__/Url_.test.jsx/Url-parse-version-detection-parses-next-keyword-1.png # apps/docs/__tests__/__screenshots__/Url_.test.jsx/Url-parse-version-detection-parses-version-without-v-prefix--PR--1231--1.png # apps/docs/scripts/LogAlgoliaEnvStatus.res # apps/docs/scripts/generate_sitemap.res # apps/docs/src/common/AlgoliaConfig.res # apps/docs/src/common/AlgoliaEnvStatus.res # apps/docs/src/common/Sitemap.res # package.json
Cloudflare deploymentDeployement ID: 0c326393-78c0-4787-ab09-591a08046a26 ⛅️ wrangler 4.85.0 ✨ Uploading _redirects |
|
Merging this in and once it's deployed, I will kick off a new Algolia crawl. |


Updates structured content to allow for better crawling results from Algolia.
Rankings, indices, and sorting will have to be updated after this goes live since Algolia can't crawl subdomain.
This adds in some new annotations to the HTML for the Algolia crawler to pick up, so the results on this PR branch won't match what we'll see on the live site once we recrawl. I'll probably have to tweak some settings in Algolia to use the new markup, but I have access and it's fairly easy to do.
Before
After